﻿<Window x:Class="CloudStorageLight.WpfClient.LoginWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:properties="clr-namespace:CloudStorageLight.WpfClient.Properties"
        xmlns:local="clr-namespace:CloudStorageLight.WpfClient"
        WindowStartupLocation="CenterScreen"
        Title="Welcome to Cloud Storage Light!" Height="255" Width="450" ResizeMode="NoResize" Loaded="Window_Loaded" Icon="Images/cloudstoragelightlog32.bmp">
    <Grid>
        <StackPanel Grid.Row="0">
            <Image Source="/CloudStorageLight;component/Images/cloudstoragelightlogo.png" />
        </StackPanel>
        <Grid Name="LoginVM" DataContext="{Binding Mode=OneWay}" Grid.Row="1" Margin="0,5,0,0">
            <StackPanel Name="LoginVMDataPanel" Orientation="Vertical" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="0">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Label Width="100" HorizontalContentAlignment="Left" VerticalAlignment="Center">
                        <TextBlock Text="{x:Static properties:Resources.MsgServerUrl}" />
                    </Label>
                    <TextBox Name="Service"  VerticalAlignment="Center" Grid.Column="1" />
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Label Width="100" HorizontalContentAlignment="Left" VerticalAlignment="Center">
                        <TextBlock Text="{x:Static properties:Resources.MsgEMail}" />
                    </Label>
                    <TextBox Name="EMail" VerticalAlignment="Center" Grid.Column="1" />
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Label Width="100" HorizontalContentAlignment="Left" VerticalAlignment="Center">
                        <TextBlock Text="{x:Static properties:Resources.MsgPassword}" />
                    </Label>
                    <PasswordBox Name="Password"  VerticalAlignment="Center" Grid.Column="1" />
                </Grid>
            </StackPanel>
            <StackPanel Name="LoginVMButtonPanel" Orientation="Horizontal" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Row="1" Grid.Column="0">
                <Button Name="LoginCommand" Click="LoginCommand_Click"  IsDefault="True" Margin="5">
                    <TextBlock Text="{x:Static properties:Resources.MsgLogin}" />
                </Button>
                <Button Name="CloseCommand" Click="CloseCommand_Click" Margin="5">
                    <TextBlock Text="{x:Static properties:Resources.MsgClose}" />
                </Button>
                <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="50,5,0,0">
                    <CheckBox Name="RememberMe" ></CheckBox>
                    <TextBlock Text="{x:Static properties:Resources.MsgSavePassword}" />
                </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="300,5,0,0">
                <CheckBox Name="AdminRole" ></CheckBox>
                <TextBlock Text="{x:Static properties:Resources.MsgAdminRole}" />
            </StackPanel>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
        </Grid>

        <StackPanel Name="BusyImage" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Hidden" Grid.Row="1" >
            <local:LoadingWait></local:LoadingWait>
        </StackPanel>


        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
    </Grid>
</Window>
